#include <stdio.h> 

int main()
{
	int total = 0;
	int max = 0;
	int min = 0;
	int score = 0;
	for ( int i = 0; i < 10; i++ ) {
		scanf("%d", &score);
		if ( i == 0) {
			max = score;
			min = score;
		}
		
		if ( max < score ) {
			max = score;
		}
		if ( min > score ) {
			min = score;
		}
		total += score;
	}
	float avg = (total - max - min) / 8.0;
	printf("%.3f", avg);
	return 0;
}

